package com.gaswell.canal;

import com.gaswell.canal.chain.Handler;
import com.gaswell.canal.chain.PoliceHandler;
import com.gaswell.canal.chain.RedisCleanHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName CanalConfig
 * @Author xiaow
 * @DATE 2024/4/7 21:44
 **/
@Configuration
public class CanalConfig {

    @Bean
    public PoliceHandler policeHandler() {
        PoliceHandler policeHandler = new PoliceHandler();
        RedisCleanHandler redisCleanHandler = new RedisCleanHandler();
        policeHandler.successor = redisCleanHandler;
        return policeHandler;

    }


}
